package com.cardbaobao.cardbabyclient.widget;

import android.content.Context;
import android.widget.RemoteViews;

import com.cardbaobao.cardbabyclient.R;

/**
 * 自定义下载进度通知栏布局
 * Created by zad
 * 2016/8/1 17:19
 */

public class ProgressRemoteViews extends RemoteViews {

    public ProgressRemoteViews(Context mContext) {
        super(mContext.getPackageName(), R.layout.layout_notification_down_update_progress);
    }

    public void setImageLogo(int imgId) {
        setImageViewResource(R.id.id_img_logo, imgId);
    }

    public void setMaxTitle(String title) {
        setTextViewText(R.id.id_txt_progress, title);
    }

    public void setSmallTitle(String title) {
        setTextViewText(R.id.id_txt_count, title);
    }

    public void setProgressBar(int len) {
        setProgressBar(R.id.id_progressbar, 100, len, false);
    }

    public void setTime(String time){
        setTextViewText(R.id.id_txt_time,time);
    }

    public void setProgressBarVisibility(int visibility) {
        setViewVisibility(R.id.id_progressbar,visibility);
    }

    public void setSmallTitleVisibility(int visibility) {
        setViewVisibility(R.id.id_txt_count,visibility);
    }
}
